#ifndef HG_DEVICEDATASERVER_H
#define HG_DEVICEDATASERVER_H

#include <QObject>
#include "dpmuser.h"



class HG_DeviceDataServer : public QObject
{
    Q_OBJECT
public:
    explicit HG_DeviceDataServer(QObject *parent = nullptr);

    DPMUser * user;

    const QString unitWeight ="unit";
    const QString waterContent ="water";

signals:
    ///
    /// \brief signalDataParket
    /// \param name 名字
    /// \param data 平均值
    /// \param datas 所有数据
    ///抛出有效的数据
    void signalDataParket(const QString& name,const QString& data,const QStringList & datas);


public slots:
    void recDatas(SocketDataPacket * packet  ,const QMap<QString,QVariant>& par );
    void link();

    void login();
    void send(const QString& msg);

    void connnent(bool link);
};

#endif // HG_DEVICEDATASERVER_H
